﻿<!DOCTYPE html>
<!--HTML5 doctype-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>取回密码－{config.webname}</title>
<meta name="keywords" content="{site.seo_keyword}" />
<meta name="description" content="{site.seo_description}" />
<link rel="stylesheet" type="text/css" href="<%templateskin%>/css/validate.css" />
<link rel="stylesheet" type="text/css" href="<%templateskin%>/css/style.css" />
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/zepto.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/weui.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/mvalidate.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/mvalidate-extend.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/common.js"></script>

</head>

<body ontouchstart>
<div class="page">
    <!--页面头部-->
    <div class="header">
        <a class="back" href="javascript:history.back();">
            <i class="iconfont icon-arrow-left"></i>
        </a>
        <h3>取回密码</h3>
        <div class="right"> 
            <a class="weui-cell_access weui-cell_link" href="<%linkurl("index")%>">
                <i class="iconfont icon-home"></i>
            </a>
        </div>
    </div>
    <!--/页面头部-->
  
    <!--页面内容-->
    <div class="page__bd">
        <input id="turl" type="hidden" value="<%linkurl("login")%>" />
        <%if(action=="")%>
        <!--取回密码-->
        <script type="text/javascript">
            $(function(){
                //初始化表单
                AjaxInitForm('#pwdForm', '#btnSubmit', 1);
            });
        </script>
        <form id="pwdForm" name="pwdForm" class="form-box" url="{config.webpath}tools/submit_ajax.ashx?action=user_getpassword&site_id={site.id}">
        <div class="weui-panel weui-panel_access" style="margin-top:10px;">
            <div class="weui-panel__hd">取回方式</div>
            <div class="weui-panel__bd">
                <div class="weui-cells_radio">
                    <label class="weui-cell weui-check__label" for="t-1">
                        <div class="weui-cell__bd">
                            <p>手机短信</i></p>
                        </div>
                        <div class="weui-cell__ft">
                            <input id="t-1" name="txtType" type="radio" class="weui-check" value="mobile" checked="checked" data-validate="select" />
                            <span class="weui-icon-checked"></span>
                        </div>
                    </label>
                    <label class="weui-cell weui-check__label" for="t-2">
                        <div class="weui-cell__bd">
                            <p>电子邮箱</i></p>
                        </div>
                        <div class="weui-cell__ft">
                            <input id="t-2" name="txtType" type="radio" class="weui-check" value="email" data-validate="select" />
                            <span class="weui-icon-checked"></span>
                        </div>
                    </label>
                </div>
            </div>
        </div>
        
        <div class="weui-panel weui-panel_access">
            <div class="weui-panel__bd">
                <div class="weui-cells_form form-box">
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">用户名</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtUserName" name="txtUserName" class="weui-input" type="text" placeholder="输入用户名" data-validate="username" />
                        </div>
                    </div>
                    
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">验证码</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtCode" name="txtCode" class="weui-input" type="text" placeholder="请输入验证码" data-validate="code" />
                        </div>
                        <div class="weui-cell__ft">
                            <a href="javascript:;" onclick="ToggleCode(this, '{config.webpath}tools/verify_code.ashx');return false;">
                            <img class="weui-vcode-img" src="{config.webpath}tools/verify_code.ashx" style="width:82px;height:24px;" />
                            </a>
                        </div>
                    </div>
                    
                </div>
            </div>
        </div>
        <div class="weui-btn-area">
            <input id="btnSubmit" name="btnSubmit" type="submit" class="weui-btn weui-btn_primary" value="确认提交" />
        </div>
        </form>
        <!--/取回密码-->
        
        <%else if(action=="mobile")%>
        <!--手机取回密码-->
        <script type="text/javascript">
            $(function(){
                //初始化表单
                AjaxInitForm('#pwdForm', '#btnSubmit', 1, '#turl');
            });
        </script>
        <form id="pwdForm" name="pwdForm" class="form-box" url="{config.webpath}tools/submit_ajax.ashx?action=user_repassword&site_id={site.id}">
        <div class="weui-panel weui-panel_access" style="margin-top:10px;">
            <div class="weui-panel__hd">修改密码</div>
            <div class="weui-panel__bd">
                <div class="weui-cells_form form-box">
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">短信验证码</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtTelphone" name="hideCode" type="text" class="weui-input" placeholder="手机收到的验证码" data-validate="code" />
                        </div>
                    </div>
                    
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">新密码</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtPassword" name="txtPassword" type="password" class="weui-input" placeholder="请输入新密码" data-validate="password" />
                        </div>
                    </div>
                    
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">确认密码</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtPassword1" name="txtPassword1" type="password" class="weui-input" placeholder="请再输入一次新密码" data-required="true" data-descriptions="confirmpassword" data-conditional="confirmpwd" />
                        </div>
                    </div>
                    
                </div>
            </div>
        </div>
        <div class="weui-btn-area">
            <input id="btnSubmit" name="btnSubmit" type="submit" class="weui-btn weui-btn_primary" value="确认修改" />
        </div>
        </form>
        <!--/手机取回密码-->
        
        <%else if(action=="email")%>
        <!--邮箱取回密码-->
        <script type="text/javascript">
            $(function(){
                //初始化表单
                AjaxInitForm('#pwdForm', '#btnSubmit', 1, '#turl');
            });
        </script>
        <form id="pwdForm" name="pwdForm" class="form-box" url="{config.webpath}tools/submit_ajax.ashx?action=user_repassword&site_id={site.id}">
        <div class="weui-panel weui-panel_access" style="margin-top:10px;">
            <div class="weui-panel__hd">修改密码</div>
            <div class="weui-panel__bd">
                <div class="weui-cells_form form-box">
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">用户名</label>
                        </div>
                        <div class="weui-cell__bd">
                            {username}
                            <input name="hideCode" type="hidden" value="{code}" />
                        </div>
                    </div>
                    
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">新密码</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtPassword" name="txtPassword" type="password" class="weui-input" placeholder="请输入新密码" data-validate="password" />
                        </div>
                    </div>
                    
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">确认密码</label>
                        </div>
                        <div class="weui-cell__bd">
                            <input id="txtPassword1" name="txtPassword1" type="password" class="weui-input" placeholder="请再输入一次新密码" data-required="true" data-descriptions="confirmpassword" data-conditional="confirmpwd" />
                        </div>
                    </div>
                    
                </div>
            </div>
        </div>
        <div class="weui-btn-area">
            <input id="btnSubmit" name="btnSubmit" type="submit" class="weui-btn weui-btn_primary" value="确认修改" />
        </div>
        </form>
        <!--/邮箱取回密码-->

        <%else if(action=="error")%>
        <!--错误界面-->
        <div class="weui-msg msg-box">
            <div class="weui-msg__icon-area">
                <i class="weui-icon-warn weui-icon_msg"></i>
            </div>
            <div class="weui-msg__text-area">
                <h2 class="weui-msg__title">验证失败</h2>
                <p class="weui-msg__desc">
                    无法验证你的账户，可能用户名不存在或者验证码已经过期！
                </p>
            </div>
            <div class="weui-msg__opr-area">
                <p class="weui-btn-area">
                    <a class="weui-btn weui-btn_primary" href="<%linkurl("usercenter","index")%>">会员中心</a>
                    <a class="weui-btn weui-btn_default" href="<%linkurl("index")%>">返回首页</a>
                </p>
            </div>
        </div>
        <!--/错误界面-->
        <%/if%>
    
        <!--版权信息-->
        <%template src="_copyright.html"%>
        <!--/版权信息-->

        <!--底部导航-->
        <%template src="_footer.html"%>
        <!--/底部导航-->
    
  </div>
  <!--/页面内容-->

</div>
</body>
</html>
